— Подсказка: аргументы по умолчанию в Python вычисляются только один раз - при определении функции. Словарь, как и список, является изменяемым объектом.
В функции update_dict параметр d={} создается один раз и используется для всех вызовов, где не передается явно другой словарь.
— Правильный ответ:B
Объяснение: 1️⃣ dict1 = update_dict('a', 1) → используется словарь по умолчанию → {'a': 1} 2️⃣ dict2 = update_dict('b', 2, {}) → создан новый словарь → {'b': 2} 2️⃣ dict3 = update_dict('c', 3) → снова используется исходный словарь → {'a': 1, 'c': 3} 4️⃣ dict1 тоже изменится, так как это ссылка на тот же объект → {'a': 1, 'c': 3}
— Подсказка: аргументы по умолчанию в Python вычисляются только один раз - при определении функции. Словарь, как и список, является изменяемым объектом.
В функции update_dict параметр d={} создается один раз и используется для всех вызовов, где не передается явно другой словарь.
— Правильный ответ:B
Объяснение: 1️⃣ dict1 = update_dict('a', 1) → используется словарь по умолчанию → {'a': 1} 2️⃣ dict2 = update_dict('b', 2, {}) → создан новый словарь → {'b': 2} 2️⃣ dict3 = update_dict('c', 3) → снова используется исходный словарь → {'a': 1, 'c': 3} 4️⃣ dict1 тоже изменится, так как это ссылка на тот же объект → {'a': 1, 'c': 3}
For some time, Mr. Durov and a few dozen staffers had no fixed headquarters, but rather traveled the world, setting up shop in one city after another, he told the Journal in 2016. The company now has its operational base in Dubai, though it says it doesn’t keep servers there.Mr. Durov maintains a yearslong friendship from his VK days with actor and tech investor Jared Leto, with whom he shares an ascetic lifestyle that eschews meat and alcohol.
Telegram Gives Up On Crypto Blockchain Project
Durov said on his Telegram channel today that the two and a half year blockchain and crypto project has been put to sleep. Ironically, after leaving Russia because the government wanted his encryption keys to his social media firm, Durov’s cryptocurrency idea lost steam because of a U.S. court. “The technology we created allowed for an open, free, decentralized exchange of value and ideas. TON had the potential to revolutionize how people store and transfer funds and information,” he wrote on his channel. “Unfortunately, a U.S. court stopped TON from happening.”